#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:homework8_1_B.py
# author:wmf
# datetime:2021/5/8 20:22
# software: PyCharm
'''
this is function description
'''
# import module your need


from random import randint
from concurrent.futures import ThreadPoolExecutor

score = [randint(0, 100) for _ in range(100)]
for x in score:
    print(x, end=' ')
print()


def print_score(name, counter):
    for i in range(0, 20):
        print("%s:第%s位同学的成绩为:%s" % (name, counter + i + 1, score[counter + i]))


if __name__ == "__main__":
    with ThreadPoolExecutor(max_workers=5) as t:
        task1 = t.submit(print_score, 'task1', 0)
        task2 = t.submit(print_score, 'task2', 20)
        task3 = t.submit(print_score, 'task3', 40)
        task4 = t.submit(print_score, 'task4', 60)
        task5 = t.submit(print_score, 'task5', 80)

